<?php
/**
 * PHP Gears Multiple File Loader
 * This application uses the Google Gears API, to select and load multiple files
 *
 * Resources:
 * 		Brad Neuberg (http://codinginparadise.org)
 * 		Gears (http://gears.google.com)
 *
 * @author Andrew Dodson
 */
if ( !empty( $_GET['n'] ) && !empty($_POST['file']) )
{
	$fd = fopen("php://input", "r");
	while( $data = fread( $fd, 10000000 ) ) file_put_contents( "./uploads/{$_GET['n']}", $data, FILE_APPEND );
        if(filesize("./uploads/{$_GET['n']}")==$_GET['t']) {
           copy("./uploads/{$_GET['n']}","./tmpFiles/{$_GET['n']}");

        }
}

?>
<script type="javascript">
alert("lol");
</script>